An example

Some general remark: The algorithms used relay heavily on optimization. Therefore it is not guranteed that the algorithms will find always a errorfree solution (even when you see the errorfree solution).

The Leisepark in Berlin

Part of the package is a data set about portals in the Leisepark in Berlin, Germany (Ingress intel map).

  library("findWeb")
  data(leisepark)
  head(leisepark)
##                                         name             shortname length
## 1 Tombstone Showing A Portal Being Captured    Tombstone Showing …     19
## 2     Grabstätte Familie Schultze und Kramer Grab. Fam. Schultze …     21
## 3             Grabstein Hans-Joachim Wilhelm     Grab. H-J Wilhelm     17
## 4                Ruhestätte Familie Dellscha   Ruhe. Fam. Dellscha     19
## 5                    Hängematte Im Leisepark       Hängematte Im …     15
## 6                    Stolperstein Mendelsohn   Stolper. Mendelsohn     19
##        lat      lon
## 1 52.52955 13.42254
## 2 52.53028 13.42343
## 3 52.52886 13.42308
## 4 52.52963 13.42115
## 5 52.53003 13.42122
## 6 52.53041 13.42391

Step 1: Compute xy portal positions from latitude annd longitude and a web

Convert the latitudes and longitudes to xy-coordinates

  xy <- ll2xy(leisepark$lon, leisepark$lat)
  head(xy)
##             x       y
## [1,] 392992.8 5821108
## [2,] 393054.6 5821188
## [3,] 393027.6 5821031
## [4,] 392898.3 5821119
## [5,] 392903.8 5821163
## [6,] 393087.6 5821201

Next, we will create as target linking structure a fishbone (or herringbone) linking structure.

The fishbone(8) structure consists of nine portals, twentyone links and 19 fields. It was one of the popular linking structures since the EXO5 Controller event in October 2017 since it is simple. And in any case no Softbank Ultra Link is necessary to build it.

What can I do if the program does not find a solution and neither me, too?

The are two parameters you can modify

  • increase the number of iterations in the optimization
  set.seed(0)
  g12 <- optimizeWeb(g0, maxit=1000000) # default: 100000

  • improve the starting position by rotation for the structure
  g02 <- web(g, xy, rot=32) # default: 16
  plot(g02)

In general the optimization algorithm will honor it if you have more portals available than your target structure requires.

Thanks

Finally, a thanks to Stefan Dirsch for testing the R package and Michael Hartley for his videos ;)

Enjoy planing and linking, agents!